package com.hotel.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hotel.pojo.Item;
import com.hotel.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface ItemMapper {
    @Select("select * from item")
    List<Item> findAll();

    @Select("select count(1) from item")
    Long getTotal();

    @Select("select item_id,item_name,item_sale from item limit #{start},#{size}")
    List<Item> findItemListByPage(@Param("start") int start,
                                  @Param("size")int size,
                                  @Param("query")String query);



}

